﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using RobotCtrl;

namespace RobotView.Resources
{
    public partial class RunLine : UserControl
    {
        #region members

        #endregion

        #region constructor & destructor
        public RunLine()
        {
            InitializeComponent();
        }
        #endregion

        #region properties
        public float Speed { get; set; }
        public float Acceleration { get; set; }
        public Drive Drive {get; set; }
        #endregion

        #region methods

        private void plusminus_Click(object sender, EventArgs e)
        {
            speedbox1.Value = -speedbox1.Value;
        }

        #endregion

        #region events
        private void button1_Click(object sender, EventArgs e)
        {
            Drive.RunLine((float)speedbox1.Value / 1000, Speed, Acceleration);
        }
        #endregion
    }
}
